﻿<Window x:Class="SSLVerifier.UI.Windows.AddServerWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:system="clr-namespace:System;assembly=mscorlib"
        Title="Add server" Height="125" Width="340"
        xmlns:viewModels="clr-namespace:SSLVerifier.API.ViewModels"
        mc:Ignorable="d"
		d:DataContext="{d:DesignInstance viewModels:AddServerVM}"
		WindowStartupLocation="CenterOwner"
		Background="{StaticResource PanelBackgroundBrush}"
		ResizeMode="NoResize"
		ShowInTaskbar="False"
		FocusManager.FocusedElement="{Binding ElementName=ServerNameBox}">
	<Window.DataContext>
		<viewModels:AddServerVM/>
	</Window.DataContext>
	<StackPanel Margin="0,10,0,0">
		<DockPanel Margin="5,0,0,0">
			<TextBlock Text="https://" VerticalAlignment="Center"/>
			<TextBox x:Name="ServerNameBox"
					 Width="200"
					 MaxLength="100"
					 ToolTip="Enter server name or IP"
					 Text="{Binding ServerName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, NotifyOnSourceUpdated=True, NotifyOnTargetUpdated=True}"/>
			<TextBlock Text=":"/>
			<ComboBox Text="{Binding Port}" ToolTip="Server port" SelectedValuePath="Content" Width="60" IsEditable="True" IsReadOnly="False" Margin="0,0,10,0">
				<ComboBoxItem>
					<system:Int32>25</system:Int32>
				</ComboBoxItem>
				<ComboBoxItem>
					<system:Int32>443</system:Int32>
				</ComboBoxItem>
				<ComboBoxItem>
					<system:Int32>636</system:Int32>
				</ComboBoxItem>
				<ComboBoxItem>
					<system:Int32>993</system:Int32>
				</ComboBoxItem>
			</ComboBox>
		</DockPanel>
		<Border BorderThickness="0,1,0,0" Background="{StaticResource PanelHeaderBackground}" Margin="0,10,0,0">
			<StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,10,10,10">
				<Button Width="60" Content="Ok" Command="{Binding OkCommand}" IsDefault="True" ToolTip="Add entry (Enter)" Margin="0,0,0,0"/>
				<Button Width="60" Content="Close" Click="CloseButton" IsCancel="True" ToolTip="Close dialog (Esc)" Margin="10,0,0,0"/>
			</StackPanel>
		</Border>
	</StackPanel>
</Window>
